# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-flask-httpauth
_pkgname=Flask-HTTPAuth
pkgver=4.8.0
pkgrel=6
pkgdesc='Basic, Digest and Token HTTP authentication for Flask routes.'
url='https://github.com/miguelgrinberg/Flask-HTTPAuth'
arch=('any')
license=('MIT')
depends=('python' 'python-flask' 'python-setuptools')
checkdepends=('python-pytest')
source=("https://github.com/miguelgrinberg/$_pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('0e32daf09d384b6e90c0ad64c2ce56ebd14c4208f11b47ba69aa490fb1d7b5d5d26c5b630aa016746716bff1f0a31df7e18b4ffcdd0578a70009fc8037f8a870')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}

